home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-10-25 | 762.3 KB | 3,975 lines | [ONLN/HLX2] |
- Developer NoteApple AudioVision 14 Display Apple Computer, Inc.© <$year>, Apple Computer, Inc.All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, mechanical, electronic, photocopying, recording, or otherwise, without prior written permission of Apple Computer, Inc. Printed in the United States of America.The Apple logo is a registered trademark of Apple Computer, Inc. Use of the “keyboard” Apple logo (Option-Shift-K) for commercial purposes without the prior written consent of Apple may constitute trademark infringement and unfair competition in violation of federal and state laws. No licenses, express or implied, are granted with respect to any of the technology described in this book. Apple retains all intellectual property rights associated with the technology described in this book. This book is intended to assist application developers to develop applications only for Apple Macintosh computers.Apple Computer, Inc.20525 Mariani AvenueCupertino, CA 95014408-996-1010Apple, the Apple logo, APDA, AppleLink, LaserWriter, and Macintosh, are trademarks of Apple Computer, Inc., registered in the United States and other countries. Apple Desktop Bus, AppleColor, AudioVision, Macintosh Quadra, PlainTalk, PowerBook, PowerBook Duo, and QuickTime are trademarks of Apple Computer, Inc.Adobe Illustrator and PostScript are trademarks of Adobe Systems Incorporated, which may be registered in certain jurisdictions.AGFA is a trademark of Agfa-Gevaert.America Online is a trademark of Quantum Computer Services, Inc.Classic is a registered trademark licensed to Apple Computer, Inc.CompuServe is a registered trademark of CompuServe Inc.FrameMaker is a registered trademark of Frame Technology Corporation.Helvetica and Palatino are registered trademarks of Linotype Company.Internet is a trademark of Digital Equipment Corporation.ITC Zapf Dingbats is a registered trademark of International Typeface Corporation.Simultaneously published in the United States and Canada.LIMITED WARRANTY ON MEDIA AND REPLACEMENTALL IMPLIED WARRANTIES ON THIS MANUAL, INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE LIMITED IN DURATION TO NINETY (90) DAYS FROM THE DATE OF THE ORIGINAL RETAIL PURCHASE OF THIS PRODUCT.Even though Apple has reviewed this manual, APPLE MAKES NO WARRANTY OR REPRESENTATION, EITHER EXPRESS OR IMPLIED, WITH RESPECT TO THIS MANUAL, ITS QUALITY, ACCURACY, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. AS A RESULT, THIS MANUAL IS SOLD “AS IS,” AND YOU, THE PURCHASER, ARE ASSUMING THE ENTIRE RISK AS TO ITS QUALITY AND ACCURACY.IN NO EVENT WILL APPLE BE LIABLE FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES RESULTING FROM ANY DEFECT OR INACCURACY IN THIS MANUAL, even if advised of the possibility of such damages.THE WARRANTY AND REMEDIES SET FORTH ABOVE ARE EXCLUSIVE AND IN LIEU OF ALL OTHERS, ORAL OR WRITTEN, EXPRESS OR IMPLIED. No Apple dealer, agent, or employee is authorized to make any modification, extension, or addition to this warranty.Some states do not allow the exclusion or limitation of implied warranties or liability for incidental or consequential damages, so the above limitation or exclusion may not apply to you. This warranty gives you specific legal rights, and you may also have other rights which vary from state to state.ContentsFigures and TablesvPreface About This NoteviiConventions Used In This NoteviiOther Reference MaterialviiiFor More InformationviiiChapter 1 Overview of the AudioVision 14 Display1Hardware Overview2Controls4I/O Connections6Integrated Speakers and Microphone7Environmental Specifications7AC Power Requirements7Software Overview8Chapter 2 Hardware Interface11CPU Interface Configurations12Direct Display-to-CPU Interface13Adapter Interface to the CPU14HDI-45 Interface Specifications15Display Interface Timing17Adapter Cable Interface19ADB Connector19Video Port20Discrete Audio Ports20Other Display I/O Ports21ADB Port21Audio Ports21Camera/VCR and S-Video Inputs22Chapter 3 AudioVision Sound and Video Panels25Overview of Sound and Video Panels26Sound Panels28Alert Sounds Panel28Sound In Panel30AudioVision Sound Panel31AudioVision Sound Options Dialog Box32Volumes Panel34Sound Out Panel36Video Panel37What the Sound Manager Does38Creating a Panel Component38Background Information39Component Flags for Panel Components40References to Panel Components40Managing Panel Components40PanelGetDITL41PanelGetTitle41PanelInstall42PanelRemove42Processing Panel Events43PanelItem43PanelEvent43Managing the Panel Settings44PanelValidateInput45PanelGetSettings45PanelSetSettings46Summary of Panel Components47Glossary49Index51Figures and TablesChapter 1 Overview of the AudioVision 14 Display1Figure 1-1 Front view of the AudioVision 14 Display3Figure 1-2 Right side and rear panel of the AudioVision 14 Display4Figure 1-3 Audio and video controls 5Figure 1-4 AudioVision 14 Display I/O ports6Figure 1-5 Block diagram of the AudioVision software components9Table 1-1 Environmental specifications7Table 1-2 AC power requirements7Chapter 2 Hardware Interface11Figure 2-1 Block diagram showing direct interface to CPU12Figure 2-2 Block diagram showing adapter interface to CPU13Figure 2-3 CPU with integrated HDI-45 connector13Figure 2-4 Adapter cable interface with CPU14Figure 2-5 Detail of adapter cable and connectors14Figure 2-6 HDI-45 connector socket pin designations15Figure 2-7 Display interface timing18Figure 2-8 ADB connector pin designations19Figure 2-9 Video connector pin designations20Figure 2-10 Adapter for audio ports21Figure 2-11 Camera/VCR connector pin designations22Table 2-1 HDI-45 connector signal assignments15Table 2-2 ADB connector signal assignments19Table 2-3 Video connector signal assignments20Table 2-4 Camera/VCR connector signal assignments23Chapter 3 AudioVision Sound and Video Panels25Figure 3-1 Sound and video panel interface 27Figure 3-2 Sound and video panels27Figure 3-3 Alert Sounds panel29Figure 3-4 Sound In panel 30Figure 3-5 AudioVision Sound panel31Figure 3-6 AudioVision Sound Options dialog box33Figure 3-7 Volumes panel35Figure 3-8 Sound Out panel36Figure 3-9 AudioVision Video panel37Table 3-1 Alert Sounds features29Table 3-2 Sound In features31Table 3-3 AudioVision Sound panel features32Table 3-4 AudioVision Sound Options functions33Table 3-5 Volumes features35Table 3-6 Sound Out panel features36Table 3-7 AudioVision Video panel features38Table 3-8 Panel components47About This NoteThe Apple AudioVision 14 Display Developer Note describes design features of the Apple AudioVision 14 Display, a new Apple monitor. The note provides hardware developers with an overview of the hardware design and interface needed to connect the display to current and future Macintosh computers. It provides software developers with an overview of the software architecture. It also supplies more detailed information about the new software panels used to interface between the application and system software to implement the display’s sound and video functions. This note assumes that you are familiar with the functionality and programming requirements for Apple Macintosh computers.The note consists of three chapters. n Chapter 1, “Overview of the AudioVision 14 Display,” describes the display’s hardware and controls and provides a summary of its specifications. It also gives an overview of the software components.n Chapter 2, “Hardware Interface,” describes two basic display-CPU configurations and provides interface specifications for the main I/O cable and for the other video, audio, and ADB ports provided by the display.n Chapter 3, “AudioVision Sound and Video Panels,” describes the functions of the panels; how to create, reference, and manage panel components; and how to process panel events and manage panel settings.Conventions Used In This NoteThe following conventions are used throughout this noteNoteThis type of note contains information of general interest.usWARNINGA warning like this directs your attention to something that could damage software or hardware, or that could result in loss of data.sTerms in boldface type are defined in the glossary. A special font, Courier, is used for characters that you type, or for lines of program code. It looks like this.The AudioVision Display is referred to in the text as the display. However, certain interface signal names use the term monitor rather than display.Other Reference MaterialRelated documentation includes:n Inside Macintosh: QuickTimen Inside Macintosh: More Macintosh ToolboxFor More InformationAPDA is Apple’s worldwide source for over three hundred development tools, technical resources, training products, and information for anyone interested in developing applications on Apple platforms. Customers receive the quarterly APDA Tools Catalog featuring all current versions of Apple development tools and the most popular third-party development tools. Ordering is easy; there are no membership fees, and application forms are not required for most of our products. APDA offers convenient payment and shipping options, including site licensing.To order products or to request a complimentary copy of the APDA Tools Catalog, contact APDA Apple Computer, Inc. P.O. Box 319Buffalo, NY 14207-0319Telephone 800-282-2732 (United States)800-637-0029 (Canada)716-871-6555 (International) Fax 716-871-6511 AppleLink APDA America Online APDA CompuServe 76666,2405 Internet APDA@applelink.apple.com Overview of the AudioVision 14 DisplayThe AudioVision 14 Display is an integrated audio and visual display. It redefines the traditional display concept and provides customers with a straightforward and affordable step up to high-quality sound. With integrated stereo speakers and a micro-phone capable of handling voice recognition applications, the AudioVision 14 Display advances Apple’s drive, and the drive of third-party developers, towards the integration of sound input and sound output with a desktop computer. The AudioVision 14 Display is designed to take advantage of today’s sound-rich multimedia applications, as well as emerging voice technologies, such as voice control, telephony, video conferencing, and text-to-speech.The display operates in two modes: Remote and Local. In Local mode, display parameters, such as volume, screen brightness, and so on, can only be controlled from the front-panel hardware controls. To put the display into Remote mode, the CPU must send a series of ADB messages to the display. At this point, all of the AudioVision 14 Display parameters (including some functions that are not accessible from the front panel controls) are under software control. This is the mode used by software, and the information provided in this note applies to the AudioVision 14 Display when it is operating in Remote mode.Chapter 1 of this note provides an overview of the AudioVision 14 Display. It includes the following information:n a general description of the AudioVision 14 Display hardware, including I/O connectors, controls, display specifications, and power requirementsn an overview of the AudioVision 14 Display software elements, including application software, sound and video panels, sound and video components, the ADB interrupt handler, and the ADB componentHardware OverviewThe AudioVision 14 Display is a new generation 14-inch RGB (red, green, blue) display, with built-in audio and video capabilities. It has n an integrated HDI-45 I/O (input/output) cablen a standard Macintosh power input cablen an output port for headphonesn an input port for an external microphone or other sound sourcen a built-in microphone, with PlainTalk capability and an LED indicatorn a built-in stereo speaker systemn two ADB (Apple Desktop Bus) ports to connect ADB devices such as keyboard and mousen easily accessible controls to change video brightness, contrast, and audio volume, and to enable the microphone n a 7-pin camera input, which can also accommodate a 4-pin S-video connectorThe AudioVision 14 Display is ergonomically designed with an integral tilt-and-swivel base. The display interfaces with existing Macintosh computers via an adapter cable. It is designed to connect directly to future computer products using a single cable interface. Chapter 2, “Hardware Interface,” provides detailed information about interfacing to the AudioVision 14 Display. Figure 1-1 and Figure 1-2 show front and rear views of the display, respectively. Figure 1-1 Front view of the AudioVision 14 DisplayFigure 1-2 Right side and rear panel of the AudioVision 14 DisplayControlsThe audio and video controls are located on the front panel of the display, as shown in Figure 1-1. Figure 1-3 shows details of these controls.The keys and buttons on the front panel control the various functions electronically, through the main processor and related software. In Local mode, screen brightness and contrast, audio volume, and the microphone are affected directly by these controls. When the AudioVision 14 Display is in Remote mode, pressing one of the controls does not directly affect the sound or video settings on the display, but instead generates ADB data which is read by the Macintosh computer to which the display is connected. The computer then instructs the display to adjust the sound or video settings. Chapter 3, “AudioVision Sound and Video Panels,” describes how the various functions are implemented and controlled through the software. Figure 1-3 Audio and video controls The display’s front panel controls initiate the following functions:n Brightness key. This rocker switch controls brightness. When you press and hold down the top of the key brightness increases. When you hold down the bottom of the key brightness decreases. The control process is continuous, and you do not need to depress and release the key to increase or decrease brightness.n Contrast key. This rocker switch controls screen contrast. It works in the same way as the brightness control key.n Mute button. This control is a toggle switch. The first time you press it, the sound is muted, the second time, sound is turned on again. You can also turn on sound again by pressing the top of the volume control key.n Volume key. This rocker switch works continuously to control the sound volume of the display. If you press and hold down the top of the key, you increase sound. If you press and hold down the bottom of the key, you lower sound.n Microphone enable button. This button allows you to enable or disable the internal microphone. n LEDs. There are two LEDs on the front panel of the AudioVision 14 Display. As shown in Figure 1-3, one comes on to indicate that power is on to the display, and the other comes on when the display is in recording mode using the internal microphone.NoteIf you are operating the display in Local mode (CPU off), only the volume control key and mute button are operative.uYou may set the parameters for the different functions either manually or through the application software, using the sound and video panels. See Chapter 3, “AudioVision Sound and Video Panels,” for details.I/O ConnectionsThe AudioVision 14 Display’s main I/O cable is permanently attached to the rear panel of the display. You cannot remove this cable. The connector at the end of the cable is an HDI-45 connector, which connects the AudioVision 14 Display to a computer, or to an adapter cable. The other connector on the rear panel of the display is a standard power connector.The display has five other I/O ports: three on the left side, and two on the right. The ADB port and the sound ports are standard Apple ports, and they accept standard connectors. The video port is used for camera or VCR inputs. These connectors are described in more detail in Chapter 2 of this developer note. Figure 1-4 shows the positions of these ports.Figure 1-4 AudioVision 14 Display I/O portsn ADB ports. The AudioVision 14 Display has two ADB ports, one on the left side and one on the right. This enables you to connect the mouse and keyboard to either side, or to connect the keyboard to one side, and the mouse to the other. sWARNINGThe ADB port and camera port are similar in appearance. The camera port accommodates a 7-pin connector, and the ADB port a 4-pin connector. Do not try to insert a camera connector plug into the ADB port, as it may damage the pins on the camera connector plug. An ADB connector will fit in the camera port. However, it will not function in that port. sn Sound out. This is a line-level output that also supports headphones. Plugging in headphones does not automatically disable the built-in speakers. You may select an option from the Sound Panel that allows you to disable the speakers when the headphones are plugged in. (Refer to Table 3-3, in Chapter 3, for further information.)n Sound in. This port allows you to connect an external microphone or other line-level sound source to the display.n Camera input. This port allows you to connect a video camera or other video input, such as a VCR, to the display. It accommodates a 7-pin video connector, or a 4-pin S-video connector.Chapter 2, “Hardware Interface,” provides the interface specifications for these connectors.Integrated Speakers and MicrophoneThe integral stereo speakers feature a ported chamber design. They have a response close to high fidelity, and deliver 80 dB SPL (sound pressure level) at 100 Hz, at 0.5 meters. The frequency range is 100Hz to 15kHz, +/-3dB.The integral microphone is a directional microphone, optimized for use with speech recognition programs. It is particularly effective in noisy office environments. Environmental SpecificationsTable 1-1 lists the environmental specifications for the display. Table 1-1 Environmental specificationsItem Specification Operating temperature 10° to 40° C (50° to 104° F) Relative humidity 20-95% Operating altitude 0 to 10,000 feet Shipping altitude 0 to 50,000 feet AC Power RequirementsTable 1-2 lists the AC power requirements for the display.Table 1-2 AC power requirements(continued)Category Requirement AC input range 90-270VRMS (root mean square) Input surge voltage 3 kV Input line transient immunity RF level of 3 volts/meter, from 26 MHz to 1 GHz Peak inrush current 40 amps peak, all load and line conditions Input line frequency 47-63 Hz, single phase Line drop out immunity 10 milliseconds (minimum), 90VRMS input, maximum load Input power under maximum load 160 watts (maximum), all line and load conditions continued Minimum input/output power efficiency 75%, all line conditions, maximum load Line voltage transient response +/- 10% instantaneous variation in average input line voltage, applied for 100 ms, with no visible effects of transient in display Load regulation Adequate for proper operation of display-related circuitry under all conditions Software OverviewThe AudioVision 14 Display software elements consist of:n sound and video control panelsn sound panelsn a video panel n sound componentsn video componentsn ADB componentn ADB Interrupt HandlerFigure 1-5 shows a simplified block diagram of the software components. The sound and video panels provide the interface between the user, or application software, and the sound and video components of the AudioVision 14 Display. These panels are subsets of the Sound control panel and the Video control panel located in the Control Panels folder under the Apple menu. You may access them through application software, or by manually opening the related control panel. For example, if you choose the Control Panels folder under the Apple menu, you can open the Sound control panel. The resulting display on the screen is a sound panel. It includes a pop-up menu that allows you to select and display additional panels.The software components and their interfaces operate the display. The sound out and sound in components handle the sound functions, and the video out component handles the video functions. These elements communicate with the display through the ADB port. An ADB component handles the communication between the display and the CPU. The ADB address is 7, and the handler ID 3. The sound and video panels are described in Chapter 3, “AudioVision Sound and Video Panels.”Figure 1-5 Block diagram of the AudioVision software componentsHardware InterfaceThis chapter describes the hardware interface for the AudioVision 14 Display. It covers the following subjects:n CPU interface configurationsn interface specifications for the main HDI-45 connectorn interface specifications for the adapter cable interfacen AudioVision 14 Display I/O ports for ADB, audio devices, camera, VCR, and S-video inputsCPU Interface ConfigurationsThis developer note deals with two basic CPU interface configurations. The first is a direct interface between the display and future CPUs which will have integrated HDI-45 connectors. Figure 2-1 shows a block diagram of this configuration. The second interface is between the display and CPUs that do not have integrated HDI-45 connectors. Figure 2-2 shows a block diagram of this configuration.Figure 2-1 Block diagram showing direct interface to CPUFigure 2-2 Block diagram showing adapter interface to CPUDirect Display-to-CPU InterfaceFigure 2-3 shows a physical representation of the first type of configuration where the integral captive cable, with its HDI-45 connector, plugs directly into a HDI-45 connector on the rear panel of the CPU.Figure 2-3 CPU with integrated HDI-45 connectorAdapter Interface to the CPU Figure 2-4 shows how the AudioVision 14 Display interfaces to a CPU that does not have an integrated HDI-45 connector. The HDI-45 connector on the captive display cable plugs into an adapter cable. The adapter cable has four cables that connect to the discrete video, sound, and ADB ports on the CPU’s rear panel. Figure 2-5 shows details of the adapter cable and connectors.NoteIf you are connecting to a CPU that has only one ADB connector, use this connector for the adapter cable connection, and plug the keyboard and mouse into the ADB connectors on the left and right side-panels of the display.uFigure 2-4 Adapter cable interface with CPU Figure 2-5 Detail of adapter cable and connectorsHDI-45 Interface SpecificationsThe AudioVision 14 Display’s captive I/O cable with its HDI-45 interface connector provide all the basic Macintosh desktop functions for the display. The 45-pin connector will plug into a socket on the rear panel of future CPUs. It also plugs into the 45-pin socket on the end of the adapter cable. Figure 2-6 shows an outline of the socket with the pin designations. Table 2-1 lists and describes the signals. Figure 2-6 HDI-45 connector socket pin designationsTable 2-1 HDI-45 connector signal assignments(continued)Pin number Signal name Description 1 ANALOG AUDIO GROUND Ground for analog audio 2 MIC SHIELD Audio input shield 3 AUDIO LINE (MIC) IN L Audio input signal (microphone), left 4 AUDIO LINE (MIC) IN R Audio input signal (microphone), right 5 LINE/HEADPHONE OUT L Audio output signal (headphone), left 6 LINE/HEADPHONE OUT R Audio output signal (headphone), right 7 Reserved Reserved for future use 8 MONITOR SENSE 1 Monitor sense bit 1 9 MONITOR SENSE 2 Monitor sense bit 2 10 VIDEO GREEN SHIELD Green video signal shield 11 VIDEO GREEN Green video signal 12 VIDEO IN PWR SUPPLY GND Video power ground 13 VIDEO IN +ve SUPPLY Video power supply; voltage required depends on the device connected to the camera/VCR connector continued 14 Reserved Reserved for future use 15 Reserved Reserved for future use 16 Reserved Reserved for future use 17 Reserved Reserved for future use 18 MONITOR SENSE 3 Monitor sense bit 3 19 VIDEO IN SHIELD Video input shield 20 VIDEO IN (LUMINANCE) Video input luminance (black and white information—picture detail, shapes, shading) 21 VIDEO IN (CHROMINANCE) Video input chrominance (color information) 22 Reserved Reserved for future use 23 Reserved Reserved for future use 24 Reserved Reserved for future use 25 Reserved Reserved for future use 26 VIDEO RED SHIELD Red video signal shield 27 VIDEO RED Red video signal 28 VIDEO IN CONTROL 1 Video input control 1 29 VIDEO IN CONTROL 2 Video input control 2 30 Reserved Reserved for future use 31 Reserved Reserved for future use 32 Reserved Reserved for future use 33 VIDEO VSYNC Vertical synchronization signal 34 VIDEO CSYNC Composite video synchronization signal 35 +5VDC (ADB 3) +5 VDC input for ADB interface 36 ADB GND (ADB 4) Logic ground for ADB connection continued 37 ADB 1 ADB pin 1—bidirectional data bus. Transfers audio and video control data between the CPU and the AudioVision 14 Display 38 ADB 2 ADB pin 2—power on. Enables computer to be turned on from the keyboard 39 Reserved Reserved for future use 40 Reserved Reserved for future use 41 Reserved Reserved for future use 42 VIDEO HSYNC Horizontal video synchronization signal 43 VIDEO SYNC RETURN Video synchronization return 44 VIDEO BLUE SHIELD Blue video signal shield 45 VIDEO BLUE Blue video signal Display Interface TimingFigure 2-7 provides the horizontal and vertical interface timing for the AudioVision 14 Display. The timing is the same as for the Macintosh Color Display.Figure 2-7 Display interface timingAdapter Cable InterfaceAn adapter cable connects the AudioVision 14 Display to CPUs that have discrete ADB, audio, and video ports. This cable has a 45-pin socket at the display end, which connects to the HDI-45 connector on the display’s captive cable. At the CPU end, the cable branches into four smaller cables, with one plug for the ADB port, one for the video port, and two for the audio ports. (See Figure 2-4 and Figure 2-5.)ADB ConnectorThe ADB connector is a standard miniature DIN (MD-4) connector. It has four signal pins and an outer shield that functions as chassis ground. Figure 2-8 shows the pin designations for the ABD connector, and Table 2-2 lists the signal assignments. Figure 2-8 ADB connector pin designationsTable 2-2 ADB connector signal assignmentsPin number Signal name Description 1 ADB Bidirectional data bus for input and output. Transfers audio and video control data between the CPU and the AudioVision 14 Display 2 POWER ON Enables power to be turned on from the keyboard 3 +5VDC +5 V power 4 GND Logic ground Outer shield None Chassis ground Video PortThe video port connection is made through a standard DB-15 connector. Figure 2-9 shows the pin designations for the connector, and Table 2-3 lists the signal assignments.Figure 2-9 Video connector pin designationsTable 2-3 Video connector signal assignmentsPin number Signal name Description 1 VIDEO RED GND Red video ground 2 VIDEO RED Red video signal 3 VIDEO CSYNC Composite video synchronization signal 4 MONITOR SENSE 0 Monitor sense bit 0 5 VIDEO GREEN Green video signal 6 VIDEO GRN GND Green video ground 7 MONITOR SENSE 1 Monitor sense bit 1 8 Reserved Reserved for future use 9 VIDEO BLUE Blue video signal 10 MONITOR SENSE 2 Monitor sense bit 2 11 C&VSYNC GND Ground for CSYNC and VSYNC 12 VIDEO VSYNC Vertical video synchronization signal 13 BLU GND Blue ground 14 HSYNC GND HSYNC ground 15 VIDEO HSYNC Horizontal video synchronization signal Discrete Audio PortsThe adapter cable provides a connection to the standard audio I/O ports on the rear panel of most earlier model Macintosh computers.Other Display I/O PortsThere are three connectors on the left side of the display:n one ADB portn two audio ports—output for headphones, input for external microphone, or other sound sourceThere are two connectors on the right side of the display:n one port for camera, VCR, or S-video inputsn one ADB portADB PortThe ADB port is a standard connector. For ADB port specifications see the previous section, “ADB Connector.” NoteThe ADB ports on the side panels of the display are used to connect ADB devices, like the mouse and keyboard. The ADB data line in the main I/O cable is used to transfer audio and video control data between the CPU and the display.uAudio PortsThe display’s audio input and audio output ports are both stereo ports, but they use single mini-stereo audio connectors. You must make sure that the connector you use for audio input or output is compatible with your audio equipment. For example, if you are connecting to a device that uses dual (RCA type) connectors for stereo sound, use a “Y” adapter to connect each of the display’s stereo audio ports to the CPU’s audio ports. Figure 2-10 shows the audio adapter configuration. The audio output port is used for headphones. The audio input port accepts sound inputs from any appropriate audio device.Figure 2-10 Adapter for audio portsCamera/VCR and S-Video InputsA 7-pin connector on the right side of the display enables you to provide a camera input, such as an Apple Video Camera input, to the AudioVision 14 Display. The camera input is routed to the CPU via the 45-pin HDI connector. Figure 2-11 shows the pin designations for the video connector, and Table 2-4 provides the signal descriptions. NoteExisting Macintosh computers cannot support a camera interface without the addition of a third-party multi-media card. Future Apple computers will provide an integral camera interface connection.uThe display also supports a 4-pin S-video VCR connection using four pins on the same connector. S-video is the commonly used shortened form of Super-Video, which refers to superior video resolution. VCRs often have a connector marked S-VHS, and state-of-the-art television sets have 4-pin mini-DIN jacks marked S-video. S-video signifies that picture information is delivered as separate luminance and components, as opposed to the single-wire delivery used in regular video or composite video. Luminance is the part of the picture responsible for detail, shapes and shadings. Chrominance contains only the color sensation and no picture detail. By separating luminance and chrominance, higher picture bandwidths can be transmitted, and this results in a higher resolution picture.Figure 2-11 Camera/VCR connector pin designationsTable 2-4 Camera/VCR connector signal assignmentsPin number Signal name Description 7-pin connector 4-pin connector 1 AGND (SIGNAL) AGND (SIGNAL) Ground for the video signal 2 AGND(PWR) AGND(PWR) Ground for power 3 VIDEO-Y VIDEO-Y Luminance signal input for S-video, or composite video input 4 VIDEO-C VIDEO-C Chrominance signal input for S-video 5 SDA Not available Bus data line for the I2C serial bus; the display is merely a pass-through for this signal 6 +VCC Not available +12 V power output. Current draw ~100 mA 7 SCL Not available Bus clock line for the I2C serial bus AudioVision Sound and Video PanelsThis chapter describes the AudioVision 14 Display’s sound and video panels. It provides an overview of sound and video panels and explains how ton create a panel n reference a panel n manage a panel n process panel eventsn manage panel settingsIn most instances, the information provided in this chapter is common to both the sound and video panels. Any differences between the two types of panels are noted in the text.The chapter is of primary interest to developers who n are developing sound or video devicesn plan to give users access to sound and video controlsOverview of Sound and Video PanelsSound and video panels provide the interface between the user, or application software, and the sound and video components of the AudioVision 14 Display. Figure 3-1 shows a simplified view of this interface. The Sound Manager controls the sound panels. It also provides the control function for the video panel. It creates panels, which include items such as sound input device selection and brightness control. The panels allow the Sound Manager to obtain configuration information from users about particular functions. Figure 3-2 shows the panels that are currently available with the display. They include:n Alert Sounds, which allows you to select, add, remove, and control the volume of the alert soundn Sound In, which allows you to select a recording sourcen AudioVision Sound, which allows you to mute the sound outputs from the internal speakers, to turn the internal microphone on or off, and to turn off the internal speakers when the headphones are plugged into the headphone jack; it also allows you to select AudioVision Sound Optionsn AudioVision Volume, which allows you to set the volume levels of the speakers, headphones, built-in sound device, and the alert soundsn Sound Out, which allows you to select the playback source and to define the playback parametersn AudioVision Video, which allows you to control brightness and contrastYou can open the panels by first choosing the Control Panels folder from the Apple menu, and then double clicking the desired sound or video control panel icon. Once a panel is open, you can select another panel from the pop-up menu. You may also open the panels through your application. Applications never call panel components directly, but make use of the panel routines, as listed later in this chapter, in Table 3-8. Figure 3-1 Sound and video panel interface Figure 3-2 Sound and video panelsPanel components rely on the facilities of the Component Manager, so to use any component, your application must use the Component Manager. You will find detailed information on this subject in Inside Macintosh: More Macintosh Toolbox.The sound and video panels are not responsible for saving the settings information. The Sound Manager manages this information on behalf of the panels, and may combine configuration information from several like panels in order to build up a complete configuration for an elaborate audio or video environment.Sound and video panels store configuration data in sound and video preferences files. The Sound Manager provides functions that allow you to create and manage user preferences for the sound and video panels. You can do this by means of the AudioVision Preferences folder, which you will find under Preferences in the System folder.Sound PanelsThis section describes the AudioVision 14 Display sound panels currently available. They include:n Alert Sounds (Figure 3-3)n Sound In (Figure 3-4)n AudioVision Sound (Figure 3-5)n AudioVision Volume (Figure 3-7)n Sound Out (Figure 3-8) You can choose other sound panels from the pop-up menu on each sound panel. This pop-up menu is located in the upper-left corner of the panel, and it is active and available to you when any of the sound panels is accessed.Alert Sounds PanelWhen you open the Sound control panel by double clicking the Sound icon in the Macintosh Control Panels folder, or when you use your application to access a sound panel, the first panel that appears on your screen is the Alert Sounds panel. This panel allows you to select and add an alert sound, remove an alert sound, control the volume of the alert sound, and choose another sound panel. Figure 3-3 shows the Alert Sounds panel.Figure 3-3 Alert Sounds panelTable 3-1 Alert Sounds featuresFeature Description Alert Sounds menu Enables you to select another sound panel. Simple Beep, Sosumi, etc., scroll list This scroll list allows you to select the type of alert sound you prefer by highlighting the item. Add button This button allows you to add an alert sound. If you click the button, a dialog box is displayed on the screen. It contains Record, Stop, Pause, and Play buttons. You may use these buttons to record up to 10 seconds of sound. You may then give this sound a name, which will appear in the Alert Sounds list. Note that this button may not appear if you do not have a sound input device. However, computers such as the Macintosh IIfx, which do not have a sound input device, allow you to install an external input device, such as a MacRecorder. If an external device is connected, the Add button appears in this panel. Remove button This button allows you to remove an alert sound. You highlight the sound to be removed, and then click the button. Alert Volume slider This slider allows you to control the volume of the alert sound. Move it up to increase volume, and down to decrease volume. The name of your sound output device will be inserted into the name of the volume control slider. In Figure 3-3 the default name “Built-in Volume” is shown. Table 3-1 describes the different features controlled by this panel.Sound In PanelIf you choose Sound In from the pop-up menu, the sound panel shown in Figure 3-4 appears on the screen. This panel allows you to select the sound input device and to select another sound panel. Sound may be input to the display from a variety of sources, including:n the built-in microphone at the top of the displayn a sound input device, such as a CD player, plugged into the audio input jack on the rear panel of the CPU n a sound input device plugged into the audio input plug on the side panel of the displayFigure 3-4 Sound In panel Table 3-2 summarizes the panel features.Table 3-2 Sound In featuresFeature Description Sound In menu This menu allows you to choose another sound panel. Choose a source for recording:Built-in icon This feature allows you to select a recording source. The Built-in icon represents the built-in sound input port on the back of the Macintosh computer. Whatever you plug into this port will be the recording source. If you plug in the AudioVision 14 Display, then the display’s built-in microphone on the front panel becomes the built-in sound source. This panel appears even if you have no input devices. The message “There is no source for recording” is displayed. If you attach another sound input device, the name of the device, and the device’s icon appears in this list in the panel. Options button The Options button is available only on certain machines, for example the Macintosh Quadra 900/950. When options are available, this button is highlighted. AudioVision Sound PanelIf you select AudioVision Sound from the pop-up menu, the AudioVision Sound panel shown in Figure 3-5 is displayed on the screen. This panel allows you to turn the internal microphone on and off, and to mute the output from the internal speakers when the headphones are plugged into the headphone jack. Figure 3-5 AudioVision Sound panelTable 3-3 AudioVision Sound panel featuresFeature Description AudioVision Sound menu This pop-up menu allows you to choose another sound panel. Internal Microphone buttons These radio buttons allow you to turn the internal microphone on or off. Mute buttons These radio buttons allow you to mute the sound output from the internal speakers. The buttons control the muting state, and also track with the state of the mute keys on the front panel of the display. This means that if you mute the sound output using the mute key on the front panel of the display, the Mute On option in this panel will be selected. Turn off internal speakers when headphones are connected If you select this feature, sound from the display’s speakers will be turned off when the headphones are plugged in to the headphone jack. Defaults button The Defaults button restores the display sound settings in this panel to the factory default setting. It also resets the settings in the AudioVision Sound Options dialog box to the factory default setting. Options button If you click the Options button, the AudioVision Sound Options dialog box will appear on the screen. See the following section “AudioVision Sound Options Dialog Box,” for further information. Table 3-3 describes the features of this panel.AudioVision Sound Options Dialog BoxIf you select Options in the AudioVision Sound panel, the dialog box shown in Figure 3-6 appears on the screen. NoteThe controls in this dialog box are intended for power users.uNoteWhen you select an option in this dialog box, it is effective immediately.uFigure 3-6 AudioVision Sound Options dialog boxTable 3-4 AudioVision Sound Options functions(continued)Feature Functions External Sound Input buttons These controls allows you to set the levels of the external sound input, specifically line level and microphone level.The AudioVision 14 Display accepts 2.0 V and 4.0 V peak-to-peak sound input signals. When you power up the display initially, the Line Level button with low sensitivity will be selected. This means that the display is set to accept the 4.0 V peak-to-peak input. If your sound input device provides a 2.0 V peak-to-peak signal, the sound output from the display will seem relatively quiet. To compensate for this, and boost the level of the sound output, you should select Microphone Level high sensitivity. Once you have done this, the Manager saves the setting, which becomes the default unless you change it.You should generally select Line Level low sensitivity for audio cassettes, audio CDs, and some Apple microphones. You should select Microphone Level (high or low sensitivity) for most other microphones. continued External sound input plays through speakers and headphonesInternal microphone disables external sound input During normal operation, you should select “External sound input plays through speakers and headphones.” When this option is selected, the “Internal microphone disables external sound input” option is also available.You should select “Internal microphone disables external sound input” only when your sound input device is a CD player plugged into the audio input connector on the side panel of the display. Note that Internal microphone disables external sound input may only be selected when External sound input plays through speakers and headphones is selected.The CD player typically provides a 16-bit sound input, which is transferred through the display to the CPU, and then back from the CPU to be output from the display’s speakers or headphone jack. Since the CPU supports only 8-bit sound I/O, the sound output provided in this way is distorted and inferior to the original input. If you select “Internal microphone disables external sound input,” the sound input will be routed directly from the input port to the display’s speakers and headphone outputs, without going through the CPU. This enables the display to function as a powered speaker system, and ensures that there is no loss in sound output quality. If you are recording from the CD (or other sound device) input, the sound input must be routed through the CPU, and you should select “External sound input plays through speakers and headphones.” Table 3-4 describes the function of each optional feature.Volumes PanelIf you select Volumes from the pop-up menu, the panel shown in Figure 3-7 appears on the screen. This panel allows you to set the volume of the alert sounds, and the outputs from the speakers and the headphones. Figure 3-7 Volumes panelTable 3-5 Volumes featuresFeature Description Volumes menu This menu allows you to select one of the other sound panels. Alert slider This slider allows you to change the volume of the alert sound. Built-In Sound slider This slider allows you to change the volume of the built-in sound device. This will generally be sound generated by applications running on the computer, such as QuickTime or Hypercard. This control is hot, which means that the volume changes as you move the slider. AudioVision Speakers slider This slider allows you to change the volume of the output from the speakers. This control is hot, which means that the volume changes as you move the slider. AudioVision Headphones slider This slider allows you to change the volume of the output from the headphones. This control is hot, which means that the volume changes as you move the slider. Table 3-5 describes the features of this panel.Sound Out PanelIf you select Sound Out from one of the pop-up menus, the panel shown in Figure 3-8 appears on the screen. This panel allows you to select the source for playback, and to define the playback parameters. Figure 3-8 Sound Out panelTable 3-6 Sound Out panel features(continued)Function Description Sound Out menu This menu allows you to select one of the other sound panels. Choose a source for playback scroll listBuilt-in icon This scroll list contains the available sound source icons. The Built-in sound input icon represents the built-in sound input port on the back of the Macintosh computer. Whatever you plug into this port will be the recording source. If you plug the AudioVision 14 Display into this port, then the display’s built-in microphone on the front panel becomes the built-in sound source. Rate pop-up menu This pop-up menu allows you to choose the output frequency. The default, as shown in Figure 3-8, is 22.254 kHz. There are alternative frequencies, which are dependent upon the capabilities of the sound output device. Generally, higher sample rates produce higher fidelity sound output. continued Size buttons These radio buttons allow you to select the size of the sound output device. Devices such as CD players are 16-bit devices. However, the CPU only supports 8-bit sound I/O, and this is the default for this function. Use buttons These radio buttons allow you to select mono or stereo output. Stereo output is the selected default. NOTEMost CPUs support only stereo output in the hardware. In this case, only the Stereo option is available. If your CPU supports only monaural sound, the stereo choice is not available. Some CPUs, such as the Macintosh IIfx, may allow you to choose either mono or stereo output. Table 3-6 summarizes the features this panel controls.Video Panel The only Apple video panel currently available is the AudioVision Video panel. To access this panel, choose the Control Panels folder from the Apple menu and open the video control panel. Figure 3-9 shows the panel that is displayed on the screen. This panel enables you to control the brightness and contrast of the AudioVision 14 Display. The controls in this panel duplicate the related controls on the front panel of the display.Figure 3-9 AudioVision Video panelTable 3-7 describes the features the AudioVision Video panel controls.Table 3-7 AudioVision Video panel featuresFeature Description AudioVision Video menu This pop-up menu allows you to choose other video panels. Currently the only video panel available is the AudioVision Video panel shown in Figure 3-9. Brightness slider This slider switch allows you to adjust the brightness of the screen. The slider switch is hot, which means that the brightness of the screen changes as you move the slider. Contrast slider This slider switch allows you to adjust the contrast of the screen. The slider switch is hot, which means that the contrast of the screen changes as you move the slider. Defaults button If you click this button, it returns the panel settings to the factory-default settings. What the Sound Manager DoesThe Sound Manager allows you to control sound and video panels. It creates the dialog boxes and pop-up menus, and manages the go-away buttons and pop-up menus. Only one panel is active at any given time.When you select a specific panel, the Sound Manager works with the component for that panel to build the panel settings dialog area. It then presents the panel on the screen. The panel processes dialog events and mouse clicks as appropriate, and validates user settings. For further information on Sound Manager functions refer to the section “Managing Panel Components,” later in this chapter. The sections on routines, such as PanelGetDITL, and so on, also provide information about the Sound Manager .Creating a Panel ComponentThis section provides the information you need to create a panel component. There are two circumstances under which you should consider creating a panel:n If you want to support special audio or video equipment the panels provided may be sufficient. However, if you develop your own panel(s), users will be able to take advantage of your equipment’s special capabilities. n If you have created your own sound output device component, you must create an accompanying sound panel, so that users can configure your device’s unique features.Background InformationApple Computer has defined a component type value for panels. You can use the following constants to specify this component type:n sound panels: #define SoundPanelComponentType 'sndP' //sound panel component typen video panels: #define VideoPanelComponentType'vidP' //video panel component typePanels use their component subtype and manufacturer values to indicate the type of configuration services they provide. For instance, the Alert Sounds panel described earlier in this chapter has the following component subtype:#define kAlertSoundsPanelalrt /*sound panel component sub-type*/Third party developers may also develop their own panels to support special features of their hardware. These panels have a subtype value that indicates the output device supported by the panel. This value should correspond to the component subtype value of the sound or video device components that may be configured by the panel. In general, Apple has reserved all lower-case values of component subtypes and manu-facturer’s codes.Apple has also defined a functional interface for panels. For information about the functions the component must support, see the section “References to Panel Components,” later in this chapter. You may use the following constants to refer to the request codes for each of the routines the component must support:/*sound panel request codes*/ or /*video panel request codes*/enum {kPanelGetDit1Select = 0kPanelGetTitleSelect,kPanelInstallSelect,kPanelEventSelect,kPanelItemSelect,kPanelRemoveSelect,kPanelValidateInputSelect,kPanelGetSettingsSelect,kPanelSetSettingsSelect,};Component Flags for Panel ComponentsThe Component Manager allows you to provide specific information about the component’s capabilities in the componentsFlags field of the component description record. These flags control how the Sound Manager manages your panel. Currently, the following flag is defined:enum {channelFlagDontOpenResFile=2 /* do not open res file */ };The channelFlagDontOpenResFile bit instructs the Sound Manager whether or not to open the component’s resource file. When bit 2 is cleared (set to zero), the Sound Manager opens the component’s resource file for you and then provides you with the appropriate file reference number. In general this is convenient. However, if the component is linked with your application and does not have its own resource file, you may not want the Sound Manager to try to open the resource file. In that case, set this bit to 1.References to Panel ComponentsThis section describes the functions that panels may support. Some of the functions are optional. This section discussesn loading, configuring, and unloading the paneln receiving and processing events in the paneln collecting and resetting the panel’s settingsManaging Panel ComponentsThe Sound Manager can load, configure, and unload the panel. As part of this process, it installs the panel’s dialog items in the settings dialog box, and it may open the component’s resource file. Panels provide a number of functions that allow the Sound Manager to manage its relationship with panels. They are:n PanelGetDITLn PanelGetTitlen PanelInstalln PanelRemoveWhen the Sound Manager prepares to add the panel component’s items to the settings dialog box, it obtains the item list by calling the PanelGetDITL function. Once it has installed the items, it calls the PanelInstall function, giving you the opportunity to set default values. Before the Sound Manager removes your items from the settings dialog, it calls the PanelRemove function.PanelGetDITLThis function allows the Sound Manager to determine which dialog items are managed by your panel. The Sound Manager uses this information to build the panel settings panel for users.pascal ComponentResult PanelGetDITL (Handle globals, Handle ditl);globals The panel’s Handle for global data.ditl Refers to a Handle that is to receive the component’s item list. The component should resize this Handle as appropriate.DescriptionThe Sound Manager calls your PanelGetDITL function to obtain the list of dialog items supported by your panel. The panel then puts these items into the settings dialog box and presents the panel to users. When the panel builds the settings dialog, it puts your items in appropriate locations. You do not need to specify locations.The component returns the item list in a Handle provided by the panel. NoteThe Sound Manager disposes of this Handle after retrieving the item, so make sure the item list is not stored in a resource. If your item list is already in a resource handle, you can use the Resource Manager’s DetachResource function to convert that resource Handle into one that is suitable for use with the PanelGetDITL function.uThe Sound Manager will open your resource file before calling the function, unless you instructed the Sound Manager not to open your resource file by setting the channelFlagDontOpenResFile component flag to 1.PanelGetTitleThe Sound Manager calls the PanelGetTitle routine if it wants to ask for a name to use as the window’s title, or as a name in the pop-up menu. This is useful if the panel requires a name that is different from its registered component name. pascal ComponentResult PanelGetTitle (Component Instance ti, StringPtr title);DescriptionThis routine is used to get the title of a panel. Typically, a panel’s title, which appears in the pop-up menu is the name of the component. This is the name required by the Component Manager. A panel may prefer a different title to appear in the pop-up menu. This call allows the panel to return its name, and provides a better match for the QuickTime API (application program interface). The routine is an optional component method call, and is currently not in use. It may be used in the future.PanelInstallThe Sound Manager calls the PanelInstall function after adding your items to the settings panel. It does this just before displaying the panel to users.pascal ComponentResult PanelInstall (Handle globals, DialogPtr, short itemOffset);globals The panel’s Handle for global data.dialog Contains a dialog pointer identifying the settings dialog box. Your component may use this value to manage its part of the dialog.itemOffset Specifies the offset to the panel’s first item in the dialog box. Because the Sound Manager builds your dialog items into a larger box containing other items, this value may be different each time your panel is installed. Do not rely on it being the same.DescriptionThe Sound Manager calls your PanelInstall function just before displaying the panel to users. The Sound Manager provides you with the information that identifies the dialog, and the offset of the panel’s items into the dialog. You may use this opportunity to set default dialog values, or initialize your control values. The Sound control panel calls the PanelRemove function to tell it to remove any special dialog items such as a list or user item. This provides the chance to remove dialog related items that the Dialog Manager does not know about. Later, the Sound control panel will call PanelClose, which allows the component to remove any storage it has allocated related to the component.PanelRemoveThe Sound Manager calls the component’s PanelRemove function before it removes the panel from the settings dialog box.pascal ComponentResult PanelRemove (Handle globals, DialogPtr dialog, short itemOffset);globals The panel’s Handle for global data.dialog Contains a dialog pointer identifying the settings dialog box.itemOffset Specifies the offset to the panel’s first item in the dialog box.DescriptionThe Sound Manager calls your PanelRemove function just before removing your items from the settings dialog box. The Sound Manager provides you with the information that identifies the dialog, and the offset of the panel’s items into the dialog. You may use this opportunity to save any changes you may have made to the dialog or to retrieve the contents of TextEdit items. If the Sound Manager opened your resource file, it will still be open when it calls this function.The Sound Manager calls your PanelInstall function before displaying the settings dialog to users. Processing Panel EventsWhen your control panel is loaded into the settings panel and is active, you may receive and process dialog events and mouse clicks. The Sound Manager calls the following functions to process sound panel events:n PanelItemn PanelEventPanelItemThe PanelItem function allows the component to receive and process mouse clicks in the settings dialog box. The Sound Manager calls your PanelItem function whenever users click a dialog item.pascal ComponentResult PanelItem (Handle globals, DialogPtr dialog, short itemOffset, short itemNum);globals The panel’s Handle for global data.dialog Contains a dialog pointer identifying the settings dialog box.itemOffset Specifies the offset to the panel’s first item in the dialog box.itemNum Contains the item number of the dialog item selected by users. Note that this is an absolute item number. The Sound Manager does not adjust this value to account for the offset to your first dialog item.DescriptionThe Sound Manager calls your PanelItem function whenever a user clicks an item in the settings dialog box. The component may then perform whatever processing is appropriate, depending upon the item number. Since the Sound Manager provides an absolute item number, it is your responsibility to adjust this value to account for the offset to the panel’s first item in the dialog box.The component can filter all dialog events with your PanelEvent function (see the next section). The Sound Manager uses the component’s PanelValidateInput function to validate the current input settings as a whole. This function is described in a later section.PanelEventThe PanelEvent function allows the component to receive and process individual dialog events. This function is similar to a modal dialog filter function.pascal ComponentResult PanelEvent (Handle globals, DialogPtr dialog, short itemOffset, Event record *theEvent, short *itemHit, Boolean *handled);globals The panel’s Handle for global data.dialog Contains a dialog pointer identifying the settings dialog box.itemOffset Specifies the offset to the panel’s first item in the dialog box.theEvent Contains a pointer to an event record, which contains information identifying the nature of the event. itemHit Refers to a field that is to receive the item number in cases where the component handles the event. handled Refers to a Boolean value. Set this Boolean to indicate whether or not the component handles the event. Set it to TRUE ifit handles the event, and to FALSE if it does not.DescriptionThe Sound Manager calls your PanelEvent function whenever an event occurs in the settings dialog box. The PanelEvent function is similar to a modal dialog filter function. The main difference is that rather than returning a Boolean value to indicate whether or not the event was handled, the PanelEvent function sets a Boolean that is provided by the calling function. If you handle the event, be sure to update the field referred to by the itemHit parameter. By default, this value will be initialized to TRUE by the Sound Manager , so you need only be concerned with setting it to FALSE. When you set handled to FALSE, you are asking the Sound Manager to call the panel’s PanelItem function.The component can process mouse clicks using the PanelItem function. See the description earlier in this chapter.Managing the Panel SettingsWhen managing panel settings, the Sound Manager does the following:n Stores panel configuration information in the preferences file. This configuration information includes settings for each of the panels and the sound and video output devices the Sound Manager uses. n Calls the component whenever it wants to retrieve these settings. It may also use previously stored settings to restore the panel’s settings. n Calls the PanelGetSettings function to restore those settings to previous values.To implement these processes, the Sound Manager calls the following functions:n PanelValidateInputn PanelGetSettingsn PanelSetSettingsPanelValidateInputWhenever users click the go-away box within the control panel, the Sound Manager calls the PanelValidateInput function to validate user settings in the panel.pascal ComponentResult PanelValidateInput (Handle globals, Boolean *ok);globals The panel’s Handle for global data.ok Contains a pointer to a Boolean value. You set this Boolean to indicate whether user settings are acceptable. Set it to TRUE if the settings are correct, otherwise, set it to FALSE.DescriptionThe Sound Manager calls the PanelValidateInput function to allow you to validate the settings chosen by users. This is your opportunity to validate them in their entirety, including those for which you may not have received dialog events or mouse clicks. For example, if your panel uses a TextEdit box, you should validate its contents at this time. Be sure to give users some indication of how to fix the settings.The Sound Manager calls this function when users click the go-away box. You indicate whether the settings are acceptable by setting the Boolean referred to by the ok parameter. If you set this Boolean to FALSE, the Sound Manager ignores the OK button in the dialog box.The component can process mouse clicks using the PanelItem function, discussed earlier in this chapter. The component can filter all dialog events with the PanelEvent function, discussed earlier in this chapter.PanelGetSettingsThe Sound Manager calls the component’s PanelGetSettings function to retrieve the panel’s current settings.pascal ComponentResult PanelGetSettings (Handle globals, Hand *ud, long flags);globals The panel’s Handle for global data.ud Contains a Handle to the panel’s configuration data. The component is responsible for creating a new Handle, and returning it as ud. The component is not responsible for disposing of the Handle.flags Reserved for future use.DescriptionThe Sound Manager calls the PanelGetSettings function to obtain a copy of the panel’s current settings. The Sound Manager stores these settings and may use them to restore the panel’s settings by calling the PanelSetSettings function. The component should store whatever values are necessary to configure the associated panel component properly. For example, standard Apple sound panels save such values as default sound output component type, default sound input device, volume levels, and alert beep sounds. These settings may be stored as part of a larger panel configuration, and must remain valid across system restarts. Therefore, you should not store values that may change without your knowledge, such as a component ID. In addition, saving a file reference number or component instance is not valid. You are recommended to set the first field of your settings data with a version number, so that you can validate the data within the setting.You are free to format the data in the Handle in any way you wish. Make sure you can retrieve the settings information from the user data item when the PanelGetSettings function is called. You may choose to format the data in such a way that other components can parse it easily, allowing the component to operate with other panels. The Sound Manager uses the component’s PanelSetSettings function to restore this configuration information. See the following section for more information.PanelSetSettingsThe Sound Manager calls the component’s PanelSetSettings function to restore the panel’s current settings. pascal ComponentResult PanelSetSettings (Handle globals, Handle ud, long flags);globals The panel’s Handle for global data.ud Identifies a Handle that contains new setting information for the panel. The component must not dispose of this Handle.flags Reserved for future use.DescriptionThe Sound Manager calls the PanelSetSettings function to restore the panel’s settings. The Sound Manager may call this function when users cancel the settings dialog, or it may use it to set default values before displaying the panel to users.The component originally creates the settings information when the Sound Manager calls the PanelGetSettings functions. The Sound Manager passes this configuration information back to you in the ud parameter to the PanelGetSettings function. The component should parse the configuration information and use it to establish the panel’s current settings.Note that the component may not be able to accommodate the original settings. For example, because settings may have been stored for some time, the hardware environment may not be able to support the values in the settings. You should try to make the new settings match the original settings as closely as possible. If you cannot make a perfect match, return an appropriate result code.The Sound Manager uses the component’s PanelGetSettings function to retrieve this configuration information. Summary of Panel ComponentsTable 3-8 summarizes the panel components. Table 3-8 Panel components(continued)Component type Component Constants Sound constants /*component type value */ #define SoundPanelType 'sndP' /* sound panel component type */ /* component sub-type values defined by Apple */ #define kAlertSoundsPanel 'alrt' /* sound panel component subtype*/ #define kInputsPanel 'mics' #define kOutputsPanel 'spek' /*componentsFlags Values for sound panel components */ enum {channelFlagDOntOpenResFile = 2 /* do not open res file */}; /* sound panel request codes */ Sound and video constants enum {kPanelGetDitlSelect = 0kPanelGetTitelSelectkPanelInstallSelectkPanelEventSelectkPanelItemSelectkPanelRemoveSelectkPanelValidateInputSelectkPanelGetSettingsSelectkPanelSetSettingsSelect Video constant #define VideoPanelType “vidP’ /* video panel component type */ Functions Managing the panel components pascal ComponentResultPanelGet DITL (Handle globals, Handle *ditl); pascal ComponentResultPanelInstall (Handle globals, DialogPtr dialog, short itemOffset); pascal ComponentResultPanelRemove (Handle globals, DialogPtr dialog, short itemOffset); continued Processing panel events pascal ComponentResultPanelItem (Handle globals, DialogPtr dialog, short itemOffset, short ItemNum); pascal ComponentResultPanelEvent (Handle globals, DialogPtr dialog, short itemOffset, eventRecord *theEvent, short *itemHit, Boolean *handled); Managing panel settings pascal ComponentResultPanelInvalidateInput (Handle globals, Boolean *ok); pascal ComponentResultPanelGetSettings (Handle globals, UserData *ud, long flags); pascal ComponentResultPanelSetSettings (Handle globals, UserData *ud, long flags); GlossarychrominanceThis component of the picture information contains only the color and no picture detail.keyUsed in this developer note to describe the rocker-style control switches on the front panel of the AudioVision 14 Display.luminanceThis component of the picture information is responsible for detail, shapes, and shadings.root mean square (RMS) valueThe RMS value is the effective or virtual value. In the case of the sinusoidally varying AC input, the RMS value is derived from the peak value divided by ÷2.sound panelProvides the interface beween the user or application software and the sound components of the AudioVision 14 Display.S-videoCommonly used shortened form of Super-Video, which refers to superior video resolution. Most state-of-the-art VCRs and television sets have S-video jacks. S-video signifies that the picture information is delivered as separate luminance and chrominance components, as opposed to the single-wire delivery used in regular video or composite video. By separating chrominance and luminance, higher picture bandwidths can be transmitted, resulting in a higher resolution picture. See also chrominance and luminance.video panelProvides the interface beween the user or application software and the video components of the AudioVision 14 Display.IndexNumerals8-bit sound I/O348-bit sound output3716-bit sound output37Aadapter cable14adapter cable interface19ADB component8ADB connector14interface19pin designations19signal assignments19ADB handler8ADB port6, 21Alert Sounds panel28features29alert sound volume35APDA addressviiiapplication software, interface with26audio controls4audio inputs6audio output6audio ports20, 21AudioVisionSound Options33AudioVision Video panel37features38AudioVision Volumes panel features35audio/visual integration2Bbrightness control5, 38built-in microphone36built-in sound input31built-in sound volume35buttonsMute32sound defaults32sound options32Ccamera connectorpin designations22signal assignments23camera inputs6, 22CD input34component flags for panel components40Component Manager28, 40components47connectorsADB14camera22HDI-4514, 15VCR22constantssound47video47contrast control5, 38control panel interface with display27control panelssound27video27controlsaudio4brightness5contrast5front panel4mute button5record button5video4volume5CPU interface configurations12creating panel components38Ddisabling external sound input34discrete audio ports20Eexternal line output level settings33external sound input, disabling34F, GfeaturesAlert Sounds panel29AudioVision Sound panel32AudioVision Video panel38AudioVision Volumes panel35Sound In panel31Sound Out panel36front panel controls4functionsPanelEvent43PanelGetDITL41PanelGetSettings45PanelInstall42PanelItem43PanelRemove42PanelSetSettings46PanelValidateInput45Hhardware interface12hardware overview2HDI-45 connector6, 14, 15interface specifications15pin designations15signal assignments15headphones32volume control35I, J, Kinputsaudio6camera6, 22CD34VCR22integrated audio/visual2interface configurations12interfacesto adapter to CPU13configurations12control panel with display27direct to CPU12, 13interfaces (continued)hardware12software27interface specificationsadapter cable19ADB connector19camera/VCR23HDI-4515video port20interface timing17interface with applications software26internal speakers32I/O cable6I/O connections6I/O ports6, 21LLEDs5Local mode2M, Nmanaging panel components40, 47managing panel settings44, 48microphone7level settings33modesLocal2Remote2mute button5Mute buttons32Ooptions dialog, Sound32output device size selection37output frequency36outputs, audio6output sample rates36overviewhardware2software8sound panels26video panel26P, Qpanel componentscomponent flags40creating38managing40, 47references to40summary47PanelEvent43PanelGetDITL41PanelGetSettings45PanelGetTitleSelect41PanelInstall42PanelItem43PanelRemove42panelsAlert Sounds28AudioVision Sound Options33AudioVision Video37Sound31sound28Sound In30Sound Out36Volumes34PanelSetSettings46PanelValidateInput45playback sound source36playback source selection36playing external sound through headphone/speakers34portsADB21audio20, 21powered speaker system34processing panel events43, 48Rrecord button5references to panel components40Remote mode2Ssample rates36sensitivity33software components8, 9software interface27software overview8sound constants47sound defaults button32sound in6Sound In panel30features31sound inputs, built-in31Sound Manager28, 40functions38Sound Options, button32Sound Options dialog32sound out6Sound Out panel36features36Sound panel31sound panels28overview26, 27Sound31sound sources36speakers7speaker volume control35summary of panel components47T, Utelephony2text-to-speech2timing for interface17V, W, X, Y, ZVCR connectorpin designations22signal assignments23VCR inputs22video conferencing2video connectorpin designations20signal assignments20video constants47video controls4brightness38contrast38video panel overview26, 27video port20visual/audio integration2voice control2voice technology2volumealert sound35built-in sound35headphones35speakers35volume control5Volumes panel34This Apple manual was written, edited, and composed on a desktop publishing system using Apple Macintosh computers and FrameMaker software. Proof pages were created on an Apple LaserWriter IINTX printer. Final pages were created on the Apple LaserWriter Pro 630. Line art was created using Adobe™ Illustrator. PostScript™, the page-description language for the LaserWriter, was developed by Adobe Systems Incorporated.Text type is Palatino® and display type is Helvetica®. Bullets are ITC Zapf Dingbats®. Some elements, such as program listings, are set in Apple Courier.WRITERJoyce D. MannDEVELOPMENTAL EDITORSWendy KrafftCassandra Markam NelsonILLUSTRATOR Deborah DennisSpecial thanks to Larry Forsblad, Joe Gammal, Wil Oxford, Rolly Reed, Jim Reekes, Melissa Sleeter, Jed Wilson, and Gary Woodcockû @ ˇ ˇˇˇˇ @
- ˇ·ˇ‚7^ , Palatino . +∫0